<!--
 ՞˶･֊･˶՞ಣ Author       : Charlie
 ՞˶･֊･˶՞ಣ Date         : 2024-11-03 17:14:45
 ՞˶･֊･˶՞ಣ LastEditors  : Charlie
 ՞˶･֊･˶՞ಣ LastEditTime : 2024-12-01 03:18:57
 ՞˶･֊･˶՞ಣ Description  : 首页
-->
<template>
  <div class="bg">
    <!-- <div class="login-box">
      <div class="title">未婚妻和我一起冒险吧！！！</div>
      <div class="login-form">
        <el-form
          :model="loginForm"
          status-icon
          :rules="rules"
          ref="loginForm"
          label-width="50px"
        >
          <el-form-item label="name" prop="username">
            <el-input
              type="text"
              v-model="loginForm.username"
            ></el-input>
          </el-form-item>
          <el-form-item label="pwd" prop="password">
            <el-input
              type="password"
              v-model="loginForm.password"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="submitForm()"
              >出发 ⌯>ᴗo⌯ಣ</el-button
            >
          </el-form-item>
        </el-form>
      </div>
    </div> -->
    <div class="left commonBox">
      <!-- 其他个人网站 -->
      <div class="boxTitle">------ connect me ------</div>
      <div class="row" v-for="item in connectList" :key="item.key">
        <div class="label">{{ item.label }}</div>
        <a :href="item.link" target="_blank" class="value">{{ item.value }}</a>
      </div>
    </div>
    <div class="right commonBox">
      <div class="boxTitle">------ quick jump ------</div>
      <div class="gridBox">
        <div class="gridItem" v-for="(item, index) in jumpList" :key="index" @click="clickJumpFn(item.path)">
          <div class="jumpTitle">{{ item.title }}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'LoginTab',
  data() {
    return {
      loginForm: {
        username: '',
        password: '',
      },
      connectList: [
        {
          key: 1,
          label: 'CSDN博客：',
          value: `@饺子大王⌯'Ⱉ'⌯`,
          link: 'https://blog.csdn.net/qq_61634399',
        },
        {
          key: 2,
          label: 'Getee账号：',
          value: '@Charlie',
          link: 'https://gitee.com/kyicxl1314/projects',
        },
      ],
      jumpList: [
        { title: '案例预览', path: '/layout' },
        { title: '案例预览', path: '/layout' },
        { title: '案例预览', path: '/layout' },
        { title: '案例预览', path: '/layout' },
        { title: '案例预览', path: '/layout' },
        { title: '案例预览', path: '/layout' },
        { title: '案例预览', path: '/layout' },
      ],
      rules: {},
    }
  },
  methods: {
    submitForm() {
      if (!this.loginForm.username || !this.loginForm.password) {
        // return this.$message({ message: '输入name和pwd和我一起出发吧!', type: 'warning' })
      }
      // if (this.loginForm.username == '未婚妻' && this.loginForm.password == 'myKing') {
      this.$router.push('/')
      // }
    },
    clickJumpFn(path){
      this.$router.push(path)
    }
  },
}
</script>

<style lang="scss" scoped>
.bg {
  transition: 0.3s all;
  position: relative;
  width: 100%;
  height: 100vh;
  margin: 0;
  // background: url(../assets/img/bg-001.jpg) center;
  @include loginBg;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  .login-box {
    // border: 2px solid #fff;
    background: rgba($color: #fff, $alpha: 0.4);
    border-radius: 8px;
    width: 500px;
    height: 300px;
    margin-bottom: 200px;

    .title {
      height: 60px;
      line-height: 60px;
      border-bottom: 2px solid #fff;
      color: plum;
      font-size: 25px;
      font-weight: bold;
    }

    .login-form {
      padding: 30px;

      .el-buttom {
        margin-left: 0;
      }
    }
  }

  .commonBox {
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    background-color: rgba(255, 255, 255, 0.5);
    width: 25%;
    height: 80%;
    border-radius: $borderRadius;
    padding: 10px;
    // color: $darkPurple;
    @include normalFontColor;
    transition: 0.3s all;

    &:hover {
      box-shadow: 1px 1px 10px $white;
    }

    .boxTitle {
      font-size: 22px;
      margin-bottom: 20px;
    }
  }

  .right {
    right: 100px;

    .gridBox {
      // 实现宽高一致
      // height: 0px;
      // padding-bottom: 100%;
      display: grid;
      grid-template-columns: repeat(3, 33.3333%);

      .gridItem {
        position: relative;
        height: 44px;
        // height: 0;
        // padding-bottom: calc(66.6667% + 30px);
        // line-height: 100%;
        // background: #000;
        @include mainBg;
        opacity: 0.8;
        border-radius: $borderRadius;
        margin: 10px;
        transition: all 0.3s;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;

        &:hover {
          scale: 1.1;
        }

        .jumpTitle {
          // position: absolute;
          // top: 50%;
          // left: 50%;
          // transform: translate(-50%, -50%);
          white-space: nowrap;
          font-size: 18px;
          transition: all 0.3s;
        }
      }
    }
  }

  .left {
    left: 100px;

    .row {
      display: flex;
      margin-bottom: 10px;

      > div {
        width: 50%;
        &.label {
          text-align: right;
          padding-right: 8px;
        }
      }

      a {
        @include normalFontColor;
        transition: 0.3s all;
        // color: $darkPurple;
        // text-decoration: none;
      }
    }
  }
}
</style>
